Client/server computing has become more and more important over the past few years in the information technology world. This type of distributed computing allows one machine to delegate some of its work to another machine that might be, for example, better suited to perform that work.
The benefits of client/server computing have been even further enhanced by the use of a well-known computer programming technology called object-oriented programming (OOP), which allows the client and server to be located on different (heterogeneous) "platforms". A platform is a combination of the specific hardware/software/operating system/communication protocol which a machine uses to do its work. OOP allows the client application program and server application program to operate on their own platforms without worrying how the client application's work requests will be communicated and accepted by the server application. Likewise, the server application does not have to worry about how the OOP system will receive, translate and send the server application's processing results back to the requesting client application.
Details of how OOP techniques have been integrated with heterogeneous client/server systems are explained in U.S. Pat. No. 5,440,744 and European Patent Published Application No. EP 0 677,943 A 2. These latter two publications are hereby incorporated by reference. However, an example, of the basic architecture will be given below for contextual understanding of the invention's environment.
As shown in FIG. 1, the client computer 10 (which could, for example, be a personal computer having the IBM OS/2 operating system installed thereon) has an application program 40 running on its operating system ("IBM" and "OS/2" are trademarks of the International Business Machines corporation). The application program 40 will periodically require work to be performed on the server computer 20 and/or data to be returned from the server 20 for subsequent use by the application program 40. The server computer 20 can be, for example, a high-powered mainframe computer running on IBM's MVS operating system ("MVS" is also a trademark of the IBM corp.). For the purposes of the present invention it is irrelevant whether the requests for communications services to be carried out by the server are instigated by user interaction with the first application program 40, or whether the application program 40 operates independently of user interaction and makes the requests automatically during the running of the program.
When the client computer 10 wishes to make a request for the server computer 20's services, the first application program 40 informs the first logic means 50 of the service required. It may for example do this by sending the first logic means the name of a remote procedure along with a list of input and output parameters. The first logic means 50 then handles the task of establishing the necessary communications with the second computer 20 with reference to definitions of the available communications services stored in the storage device 60. All the possible services are defined as a cohesive framework of object classes 70, these classes being derived from a single object class. Defining the services in this way gives rise to a great number of advantages in terms of performance and reusability.
To establish the necessary communication with the server 20, the first logic means 50 determines which object class in the framework needs to be used, and then creates an instance of that object, a message being sent to that object so as to cause that object to invoke one of its methods. This gives rise to the establishment of the connection with the server computer 20 via the connection means 80, and the subsequent sending of a request to the second logic means 90.
The second logic means 90 then passes the request on to the second application program 100 (hereafter called the service application) running on the server computer 20 so that the service application 100 can perform the specific task required by that request, such as running a data retrieval procedure. Once this task has been completed the service application may need to send results back to the first computer 10. The server application 100 interacts with the second logic means 90 during the performance of the requested tasks and when results are to be sent back to the first computer 10. The second logic means 90 establishes instances of objects, and invokes appropriate methods of those objects, as and when required by the server application 100, the object instances being created from the cohesive framework of object classes stored in the storage device 110.
Using the above technique, the client application program 40 is not exposed to the communications architecture. Further the service application 100 is invoked through the standard mechanism for its environment; it does not know that it is being invoked remotely.
The Object Management Group (OMG) is an international consortium of organizations involved in various aspects of client/server computing on heterogeneous platforms as is shown in FIG. 1. The OMG has set forth published standards by which client computers (e.g. 10) communicate (in OOP form) with server machines (e.g. 20). As part of these standards, an Object Request Broker has been defined, which provides the object-oriented bridge between the client and the server machines. The ORB decouples the client and server applications from the object oriented implementation details, performing at least part of the work of the first and second logic means 50 and 90 as well as the connection means 80.
FIG. 2 shows a conventional architecture for such a system. Once client requests find their way through the ORB 21 and into the server, the ORB finds a particular server object capable of executing the request and sends the request to that server object's object adapter 22 (also defined by OMG standard) where it is stored in the object adapter's buffer to await processing by the server object. The server object has a plurality of parallel execution threads (23a, 23b, 23c) upon any of which it can run an instance of itself. In this way, the server object is able to process plural requests at the same time. The object adapter 22 looks to see which of the parallel execution threads is ready to process another request and then assigns one of the requests to the next available execution thread. This is explained in the above-mentioned U.S. Pat. as a "dispatching" mechanism whereby the server dispatches requests to execution threads.
The OMG-standard server architecture of FIG. 2 finds particular utility in the field of transaction processing. Computer implemented transaction processing systems are used for critical business tasks in a number of industries. A transaction defines a single unit of work that must either be fully completed or fully purged without action. For example, in the case of a bank automated teller machine from which a customer seeks to withdraw money, the actions of issuing the money, reducing the balance of money on hand in the machine and reducing the customer's bank balance must all occur or none of them must occur. Failure of one of the subordinate actions would lead to inconsistency between the records and the actual occurrences.
Distributed transaction processing involves a transaction that affects resources at more than one physical or logical location. In the above example, a transaction affects resources managed at the local automated teller device as well as bank balances managed by a bank's main computer. Such transactions involve one particular client computer (e.g, 10 in FIG. 1) communicating with one particular server computer (e.g., 20) over a series of client requests which are processed by the server.
In typical client/server systems, client and server systems are each contributing to the overall processing of such transactions. Further, many different clients may be concurrently attempting to use the same server to engage in separate transactions. For example, many different banking ATM machines (client systems) may be trying to concurrently begin transactions so as to access data from a popular database program running on the bank's large central server. In some of these situations, the server must be able to isolate these concurrent transactions so that they do not affect each other. That is, until one transaction is finished (either all parts are committed or all parts are aborted) other transactions trying to access the same server objects must be made to wait.
For example, if a husband is trying to transfer $2000 from a family's checking account into the family's higher interest paying savings account at an ATM machine at one bank on one side of town and his wife is attempting to perform the same transaction at another ATM (owned by a different bank) on the other side of town, the server must be able to deal with this situation effectively so that the two concurrent transactions do not create a problem for the bank owning the database server.
The way this problem is typically solved is for the server database program to perform transactional locking on concurrent accesses. That is, the database management system (DBMS) of the server would lock access to the family's account data stored in the database once a first client (e.g. the husband's ATM) requests access. Then, the husband's transaction would continue in isolation despite the fact that the wife's transaction has been requested concurrently. The wife's client ATM would not be granted access to the data because the husband's client ATM would already have a lock on the data.
Placing the concurrency control responsibility in the server application (i.e. in the DBMS) has worked fine for database servers as discussed above which already have the complex locking techniques integrated into their management system software. However, if other types of applications are to be used, the above system requires that the server application programmer include the complex locking schemes into his/her program while writing the object-oriented program. Also, the programmer must have an in-depth knowledge of transaction theory in order to be able to create the appropriate transaction context into the concurrency control aspects of the program.
To overcome this problem, the International Business Machines Corporation (IBM) has filed a patent application (UK Patent Application No. 9701566.3) on Jan. 25 1997, which discloses a method whereby transactional locking is performed within the ORB (21 of FIG. 2). That is, as each client request comes through the ORB 21 on the way to the object adapter 22, the method determines whether a lock on server resources is necessary and obtains such a lock if the locks will not conflict with currently held locks. If a conflict exists, the incoming request must wait until the currently held conflicting lock (from a previous request) is released.
In both of these prior approaches, however, it is necessary to obtain locks on server resources in order to carry out concurrency control. The processing steps involved in obtaining such locks are as follows. First, an incoming request is dispatched to an available thread and thus an instance of the server object is instantiated. Second, local storage for this particular instance of the server object is obtained for this thread. Third, the program and data associated with the server object is loaded into the storage. Fourth, the relevant file is accessed for execution. Finally, after all of the above four steps are carried out, a lock is obtained on the server object to ensure that subsequent requests will not be allowed to conflict with this request's access to the server object's resources. For the next dispatched request, the first four steps are carried out and if this request requires access to a locked resource, the request must wait until the lock on the server object from the first request has been released.
The use of locks to perform concurrency control often results in an inefficient use of central processor unit (cpu) resources, especially as the number of concurrent requests increases. For example, assume that 2000 users are all sharing the same exchange rate object and that 1999 of them are clients that would like to obtain the most recent value of a popular exchange rate (e.g., from United States dollars to United Kingdom pounds sterling) and one user is requesting to update the value of the exchange rate. The use of locks results in 2000 threads being used and 2000 local storage areas being allocated. A very large number of cpu processing cycles is required in dispatching this many requests onto threads, obtaining this many storage areas, loading the large number of programs and accessing the large number of files. Thus, a great need exists in this art for a more efficient way to dispatch client requests.